package com.zhanghe.study.study_scala.basic

/**
 * 变量声明
 * var修饰的变量可以改变，val修饰的变量不可改变，相当于java中使用final修饰的变量
 *
 * @author zh
 * @date 2021/4/27 10:03
 */
object TestVar {
  def main(args: Array[String]): Unit = {
    val sex:Int = 1
    var age:Int = 10
    var sal:Double = 10.9
    var name:String = "张三"
    var isPass:Boolean = true
    var score:Float = 70.9f

    var + = 10
    println(+)

    var +- = 20
    println(+-)

    var `var` = 30
    println(`var`)

    var __ = 10
    println(__)

  }

}
